package p1;

import java.util.Locale;

/**
 * @author krystal
 * @date 2022/11/9 15:31
 */
public class Demo12 {
    public static void main(String[] args) {
        String s = "hello";
        System.out.println(s.length());
        System.out.println(s.toUpperCase());
        System.out.println(s.replace("o","d"));

        //int转string
        int num = 10;
        String str1=num + "";  //方法1
        String str2 = String.valueOf(num);  //方法2
        System.out.println(str1);
        System.out.println(str2);

        //string转int
        String str = "100";
        int num1 = Integer.parseInt(str);
        System.out.println(num1+1);

        StringBuilder stringBuilder=new StringBuilder("baekhyun");
        stringBuilder.reverse();
        System.out.println(stringBuilder);
    }
}
